package principle.flyweight;

/**
 * @author malguy-wang sir
 * @create ---
 */
public class client {
    public static void main(String[] args) {
        websiteFactory factory = new websiteFactory();
        website blog = factory.getWebsite("blog");
        blog.use(new User("tom"));
        website news = factory.getWebsite("news");
        news.use(new User("maker"));
        website news1 = factory.getWebsite("news");
        news1.use(new User("kfc"));
        System.out.println(factory.getWebsiteSize());
    }
}
